const test = require("./../controller/test");
const handlePrize = require("./../controller/handle-prize");
const express = require("express");
const router = express.Router();

router.get("/getPrizeCountByName", test.getPrizeCountByName);

router.post("/addPrize", test.addPrize);

//获取所有奖品
router.get("/api/get_lottery_goods", handlePrize.getLotteryGoods);
//添加奖品
router.post("/api/add_lottery_good", handlePrize.addLotteryGood);
//计算中奖
router.get("/api/get_lottery_result", handlePrize.getLotteryResult);
//获取当前消耗品数以及每次抽奖消耗数量
router.get("/api/get_consumables_info", handlePrize.getConsumablesInfo);
//添加当前消耗品数以及每次抽奖消耗数量
router.post("/api/add_consumables_info", handlePrize.addConsumablesInfo);
//返回所有奖品
router.get("/api/get_all_lottery_goods", handlePrize.getAllLotteryGoods);


module.exports = router;
